home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #1 / Ham Radio 2000.iso / ham2000 / hf / dsp / dsp4src / spy.lst < prev    next >
Encoding:
File List  |  1994-03-26  |  5.8 KB  |  199 lines

  1. Motorola DSP56000 Assembler  Version 3.1  94-03-26  17:38:39  spy.asm  Page 1
  2.  
  3.  
  4.  
  5. 1                        ;******************************************************
  6. *********
  7. 2                        ;* SPY.ASM -- Simple oscilloscope with SPY             
  8.        *
  9. 3                        ;*                                                     
  10.   *
  11. 4                        ;* Displays Left channel on the SPY program.           
  12.        *
  13. 5                        ;*                                                     
  14.   *
  15. 6                        ;* Copyright (C) 1994 by Alef Null. All rights reserved
  16. .       *
  17. 7                        ;* Author(s): Jarkko Vuori, OH2LNS                     
  18.       *
  19. 8                        ;* Modification(s):                                    
  20.     *
  21. 9                        ;******************************************************
  22. *********
  23. 10     
  24. 11     
  25. 223    
  26. 224    
  27. 225       000010         buflen    equ     16                                ; l
  28. enght of sample buffer
  29. 226    
  30. 227                      ; flags
  31. 228       000003         spyflg    equ     3                                 ; s
  32. py on/off
  33. 229    
  34. 230    
  35. 231       P:0040                   org     p:user_code
  36. 232    
  37. 233       P:0040 67F400            move              #buffer+2,r7
  38.                  000042
  39. 234       P:0042 053FA7            move              #buflen*4-1,m7
  40. 235    
  41. 236       P:0043 62F400            move              #buffer,r2
  42.                  000040
  43. 237       P:0045 3A0300            move              #4-1,n2
  44. 238       P:0046 053FA2            move              #buflen*4-1,m2
  45. 239    
  46. 240                                ctrlcd  1,r2,buflen,LINEI,0.0,0.0,LINEO|HEADP
  47. ,0.0,0.0
  48. 261                                opencd  8
  49. 290    
  50. 291                      ; wait for one complete block
  51. 292                      loop      waitblk r2,buflen,1
  52. 310    
  53. 311                      ; copy left channel to the both outputs
  54. 312       P:0063 56DA00            move              x:(r2)+,a
  55. 313       P:0064 5E5A00            move                          a,y:(r2)+
  56. 314       P:0065 5E5A00            move                          a,y:(r2)+
  57. 315       P:0066 205A00            move              (r2)+
  58. 316    
  59. 317                      ; and to the spy
  60. 318       P:0067 0D0069            jsr     <spy
  61. 319    
  62. 320       P:0068 0C0055            jmp     <loop
  63. 321    
  64. 322    
  65. 323                      ; *** special spy ***
  66. 324       P:0069 0A18A3  spy       jset    #spyflg,x:<flag,_spyon
  67. Motorola DSP56000 Assembler  Version 3.1  94-03-26  17:38:39  spy.asm  Page 2
  68.  
  69.  
  70.  
  71.                  00007C
  72. 325    
  73. 326                                lookc                                     ; c
  74. heck if spy operation requested
  75. 328       P:006C 0E8095            jcs     <_spyend
  76. 329       P:006D 56F400            move              #>'S',a
  77.                  000053
  78. 330       P:006F 200045            cmp     x0,a
  79. 331       P:0070 0E2095            jne     <_spyend
  80. 332    
  81. 333       P:0071 44F400            move              #>'P',x0                ; y
  82. es, send first a preamble
  83.                  000050
  84. 334                                putc
  85. 336       P:0074 54F400            move              #>512,a1
  86.                  000200
  87. 337       P:0076 541900            move              a1,x:<spyn
  88. 338       P:0077 54F400            move              #>1,a1
  89.                  000001
  90. 339       P:0079 541A00            move              a1,x:<spym
  91. 340       P:007A 0A1823            bset    #spyflg,x:<flag
  92. 341       P:007B 0C0095            jmp     <_spyend
  93. 342    
  94. 343                      ; spy is active, send a register to the host
  95. 344       P:007C 579A00  _spyon    move              x:<spym,b
  96. 345       P:007D 47F400            move              #>1,y1
  97.                  000001
  98. 346       P:007F 47F47C            sub     y1,b      #>1,y1
  99.                  000001
  100. 347       P:0081 571A00            move              b,x:<spym
  101. 348       P:0082 0E2095            jne     <_spyend
  102. 349       P:0083 471A00            move              y1,x:<spym
  103. 350    
  104. 351       P:0084 21C600            move              a,y0                    ; L
  105. SB first
  106. 352       P:0085 0608A0            rep     #8
  107. 353       P:0086 200023            lsr     a
  108. 354       P:0087 218400            move              a1,x0
  109. 355                                putc
  110. 357    
  111. 358       P:0089 20CE00            move              y0,a                    ; t
  112. hen HSB
  113. 359       P:008A 0610A0            rep     #16
  114. 360       P:008B 200023            lsr     a
  115. 361       P:008C 218400            move              a1,x0
  116. 362                                putc
  117. 364    
  118. 365       P:008E 569900            move              x:<spyn,a               ; c
  119. heck if all samples allready given
  120. 366       P:008F 44F400            move              #>1,x0
  121.                  000001
  122. 367       P:0091 200044            sub     x0,a
  123. 368       P:0092 561900            move              a,x:<spyn
  124. 369       P:0093 0E2095            jne     <_spyend
  125. 370       P:0094 0A1803            bclr    #spyflg,x:<flag
  126. 371    
  127. 372       P:0095 00000C  _spyend   rts
  128. 373    
  129. 374    
  130. 375    
  131. 376       X:0018                   org     x:user_data
  132. 377    
  133. Motorola DSP56000 Assembler  Version 3.1  94-03-26  17:38:39  spy.asm  Page 3
  134.  
  135.  
  136.  
  137. 378       X:0018         flag      dc      0
  138. 379       X:0019         spyn      ds      1
  139. 380       X:001A         spym      ds      1
  140. 381    
  141. 382       X:0040         buffer    dsm     buflen*4
  142. 383    
  143. 384    
  144. 385       Y:0018                   org     y:user_data
  145. 386    
  146. 387       Y:0040                   dsm     buflen*4
  147. 388    
  148. 389    
  149. 390                                end
  150.  
  151. 0    Errors
  152. 0    Warnings
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.